package com.ruoyi.activity.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.activity.mapper.CheActivityMapper;
import com.ruoyi.activity.domain.CheActivity;
import com.ruoyi.activity.service.ICheActivityService;

/**
 * 信息发布Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-04
 */
@Service
public class CheActivityServiceImpl implements ICheActivityService 
{
    @Autowired
    private CheActivityMapper cheActivityMapper;

    /**
     * 查询信息发布
     * 
     * @param id 信息发布主键
     * @return 信息发布
     */
    @Override
    public CheActivity selectCheActivityById(Long id)
    {
        return cheActivityMapper.selectCheActivityById(id);
    }

    /**
     * 查询信息发布列表
     * 
     * @param cheActivity 信息发布
     * @return 信息发布
     */
    @Override
    public List<CheActivity> selectCheActivityList(CheActivity cheActivity)
    {
        return cheActivityMapper.selectCheActivityList(cheActivity);
    }

    /**
     * 新增信息发布
     * 
     * @param cheActivity 信息发布
     * @return 结果
     */
    @Override
    public int insertCheActivity(CheActivity cheActivity)
    {
        cheActivity.setCreateTime(DateUtils.getNowDate());
        return cheActivityMapper.insertCheActivity(cheActivity);
    }

    /**
     * 修改信息发布
     * 
     * @param cheActivity 信息发布
     * @return 结果
     */
    @Override
    public int updateCheActivity(CheActivity cheActivity)
    {
        return cheActivityMapper.updateCheActivity(cheActivity);
    }

    /**
     * 批量删除信息发布
     * 
     * @param ids 需要删除的信息发布主键
     * @return 结果
     */
    @Override
    public int deleteCheActivityByIds(Long[] ids)
    {
        return cheActivityMapper.deleteCheActivityByIds(ids);
    }

    /**
     * 删除信息发布信息
     * 
     * @param id 信息发布主键
     * @return 结果
     */
    @Override
    public int deleteCheActivityById(Long id)
    {
        return cheActivityMapper.deleteCheActivityById(id);
    }
}
